Integrand size = 26, antiderivative size = 634 \[ \int \frac {(a+b x)^m (c+d x)^{-4-m}}{(e+f x)^2} \, dx=-\frac {d (a d f (4+m)-b (d e+c f (3+m))) (a+b x)^{1+m} (c+d x)^{-3-m}}{(b c-a d) (b e-a f) (d e-c f)^2 (3+m)}-\frac {d \left (a^2 d^2 f^2 \left (12+7 m+m^2\right )-b^2 \left (2 d^2 e^2-2 c d e f (4+m)-c^2 f^2 \left (6+5 m+m^2\right )\right )-2 a b d f \left (d e (2+m)+c f \left (10+6 m+m^2\right )\right )\right ) (a+b x)^{1+m} (c+d x)^{-2-m}}{(b c-a d)^2 (b e-a f) (d e-c f)^3 (2+m) (3+m)}-\frac {d \left (a^3 d^3 f^3 \left (24+26 m+9 m^2+m^3\right )-a^2 b d^2 f^2 (3+m) \left (d e (4+3 m)+c f \left (20+15 m+3 m^2\right )\right )-b^3 \left (2 d^3 e^3-2 c d^2 e^2 f (5+m)+c^2 d e f^2 \left (26+17 m+3 m^2\right )+c^3 f^3 \left (6+11 m+6 m^2+m^3\right )\right )-a b^2 d f \left (2 d^2 e^2 (2+m)-2 c d e f \left (16+15 m+3 m^2\right )-c^2 f^2 \left (44+50 m+21 m^2+3 m^3\right )\right )\right ) (a+b x)^{1+m} (c+d x)^{-1-m}}{(b c-a d)^3 (b e-a f) (d e-c f)^4 (1+m) (2+m) (3+m)}-\frac {f (a+b x)^{1+m} (c+d x)^{-3-m}}{(b e-a f) (d e-c f) (e+f x)}-\frac {f^3 (a d f (4+m)-b (4 d e+c f m)) (a+b x)^m (c+d x)^{-m} \operatorname {Hypergeometric2F1}\left (1,-m,1-m,\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{(b e-a f) (d e-c f)^5 m} \]
-d*(a*d*f*(4+m)-b*(d*e+c*f*(3+m)))*(b*x+a)^(1+m)*(d*x+c)^(-3-m)/(-a*d+b*c) /(-a*f+b*e)/(-c*f+d*e)^2/(3+m)-d*(a^2*d^2*f^2*(m^2+7*m+12)-b^2*(2*d^2*e^2- 2*c*d*e*f*(4+m)-c^2*f^2*(m^2+5*m+6))-2*a*b*d*f*(d*e*(2+m)+c*f*(m^2+6*m+10) ))*(b*x+a)^(1+m)*(d*x+c)^(-2-m)/(-a*d+b*c)^2/(-a*f+b*e)/(-c*f+d*e)^3/(2+m) /(3+m)-d*(a^3*d^3*f^3*(m^3+9*m^2+26*m+24)-a^2*b*d^2*f^2*(3+m)*(d*e*(4+3*m) +c*f*(3*m^2+15*m+20))-b^3*(2*d^3*e^3-2*c*d^2*e^2*f*(5+m)+c^2*d*e*f^2*(3*m^ 2+17*m+26)+c^3*f^3*(m^3+6*m^2+11*m+6))-a*b^2*d*f*(2*d^2*e^2*(2+m)-2*c*d*e* f*(3*m^2+15*m+16)-c^2*f^2*(3*m^3+21*m^2+50*m+44)))*(b*x+a)^(1+m)*(d*x+c)^( -1-m)/(-a*d+b*c)^3/(-a*f+b*e)/(-c*f+d*e)^4/(1+m)/(2+m)/(3+m)-f*(b*x+a)^(1+ m)*(d*x+c)^(-3-m)/(-a*f+b*e)/(-c*f+d*e)/(f*x+e)-f^3*(a*d*f*(4+m)-b*(c*f*m+ 4*d*e))*(b*x+a)^m*hypergeom([1, -m],[1-m],(-a*f+b*e)*(d*x+c)/(-c*f+d*e)/(b *x+a))/(-a*f+b*e)/(-c*f+d*e)^5/m/((d*x+c)^m)
Time = 1.59 (sec) , antiderivative size = 562, normalized size of antiderivative = 0.89 \[ \int \frac {(a+b x)^m (c+d x)^{-4-m}}{(e+f x)^2} \, dx=-\frac {(a+b x)^{1+m} (c+d x)^{-3-m} \left (\frac {d}{e+f x}+\frac {f (b d e+b c f (3+m)-a d f (4+m)) (c+d x)}{(b e-a f) (d e-c f) (e+f x)}+\frac {(c+d x) \left (d (b c-a d) (b e-a f) (d e-c f) (1+m)^2 \left (-a^2 d^2 f^2 \left (12+7 m+m^2\right )+b^2 \left (2 d^2 e^2-2 c d e f (4+m)-c^2 f^2 \left (6+5 m+m^2\right )\right )+2 a b d f \left (d e (2+m)+c f \left (10+6 m+m^2\right )\right )\right )+(c+d x) \left (d (b e-a f) (1+m) \left (-a^3 d^3 f^3 \left (24+26 m+9 m^2+m^3\right )+a^2 b d^2 f^2 (3+m) \left (d e (4+3 m)+c f \left (20+15 m+3 m^2\right )\right )+b^3 \left (2 d^3 e^3-2 c d^2 e^2 f (5+m)+c^2 d e f^2 \left (26+17 m+3 m^2\right )+c^3 f^3 \left (6+11 m+6 m^2+m^3\right )\right )+a b^2 d f \left (2 d^2 e^2 (2+m)-2 c d e f \left (16+15 m+3 m^2\right )-c^2 f^2 \left (44+50 m+21 m^2+3 m^3\right )\right )\right )-(b c-a d)^3 f^3 \left (6+11 m+6 m^2+m^3\right ) (-a d f (4+m)+b (4 d e+c f m)) \operatorname {Hypergeometric2F1}\left (1,1+m,2+m,\frac {(d e-c f) (a+b x)}{(b e-a f) (c+d x)}\right )\right )\right )}{(b c-a d)^2 (b e-a f)^2 (d e-c f)^3 (1+m)^2 (2+m)}\right )}{(b c-a d) (-d e+c f) (3+m)} \]
-(((a + b*x)^(1 + m)*(c + d*x)^(-3 - m)*(d/(e + f*x) + (f*(b*d*e + b*c*f*( 3 + m) - a*d*f*(4 + m))*(c + d*x))/((b*e - a*f)*(d*e - c*f)*(e + f*x)) + ( (c + d*x)*(d*(b*c - a*d)*(b*e - a*f)*(d*e - c*f)*(1 + m)^2*(-(a^2*d^2*f^2* (12 + 7*m + m^2)) + b^2*(2*d^2*e^2 - 2*c*d*e*f*(4 + m) - c^2*f^2*(6 + 5*m + m^2)) + 2*a*b*d*f*(d*e*(2 + m) + c*f*(10 + 6*m + m^2))) + (c + d*x)*(d*( b*e - a*f)*(1 + m)*(-(a^3*d^3*f^3*(24 + 26*m + 9*m^2 + m^3)) + a^2*b*d^2*f ^2*(3 + m)*(d*e*(4 + 3*m) + c*f*(20 + 15*m + 3*m^2)) + b^3*(2*d^3*e^3 - 2* c*d^2*e^2*f*(5 + m) + c^2*d*e*f^2*(26 + 17*m + 3*m^2) + c^3*f^3*(6 + 11*m + 6*m^2 + m^3)) + a*b^2*d*f*(2*d^2*e^2*(2 + m) - 2*c*d*e*f*(16 + 15*m + 3* m^2) - c^2*f^2*(44 + 50*m + 21*m^2 + 3*m^3))) - (b*c - a*d)^3*f^3*(6 + 11* m + 6*m^2 + m^3)*(-(a*d*f*(4 + m)) + b*(4*d*e + c*f*m))*Hypergeometric2F1[ 1, 1 + m, 2 + m, ((d*e - c*f)*(a + b*x))/((b*e - a*f)*(c + d*x))])))/((b*c - a*d)^2*(b*e - a*f)^2*(d*e - c*f)^3*(1 + m)^2*(2 + m))))/((b*c - a*d)*(- (d*e) + c*f)*(3 + m)))
Time = 1.07 (sec) , antiderivative size = 668, normalized size of antiderivative = 1.05, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {114, 172, 172, 172, 25, 27, 141}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a+b x)^m (c+d x)^{-m-4}}{(e+f x)^2} \, dx\) |
\(\Big \downarrow \) 114 |
\(\displaystyle -\frac {\int \frac {(a+b x)^m (c+d x)^{-m-4} (a d f (m+4)-b (d e+c f m)+3 b d f x)}{e+f x}dx}{(b e-a f) (d e-c f)}-\frac {f (a+b x)^{m+1} (c+d x)^{-m-3}}{(e+f x) (b e-a f) (d e-c f)}\) |
\(\Big \downarrow \) 172 |
\(\displaystyle -\frac {\frac {\int \frac {(a+b x)^m (c+d x)^{-m-3} \left (-\left (\left (2 d^2 e^2-2 c d f (m+3) e-c^2 f^2 m (m+3)\right ) b^2\right )-2 a d f (m+2) (d e+c f (m+3)) b+2 d f (a d f (m+4)-b (d e+c f (m+3))) x b+a^2 d^2 f^2 \left (m^2+7 m+12\right )\right )}{e+f x}dx}{(m+3) (b c-a d) (d e-c f)}-\frac {d (a+b x)^{m+1} (c+d x)^{-m-3} (-a d f (m+4)+b c f (m+3)+b d e)}{(m+3) (b c-a d) (d e-c f)}}{(b e-a f) (d e-c f)}-\frac {f (a+b x)^{m+1} (c+d x)^{-m-3}}{(e+f x) (b e-a f) (d e-c f)}\) |
\(\Big \downarrow \) 172 |
\(\displaystyle -\frac {\frac {\frac {\int \frac {(a+b x)^m (c+d x)^{-m-2} \left (-\left (\left (2 d^3 e^3-2 c d^2 f (m+4) e^2+3 c^2 d f^2 \left (m^2+5 m+6\right ) e+c^3 f^3 m \left (m^2+5 m+6\right )\right ) b^3\right )-a d f \left (2 d^2 (m+2) e^2-2 c d f \left (3 m^2+14 m+14\right ) e-c^2 f^2 \left (3 m^3+19 m^2+38 m+24\right )\right ) b^2-a^2 d^2 f^2 (m+3) \left (d e (3 m+4)+c f \left (3 m^2+14 m+16\right )\right ) b+d f \left (-\left (\left (2 d^2 e^2-2 c d f (m+4) e-c^2 f^2 \left (m^2+5 m+6\right )\right ) b^2\right )-2 a d f \left (d e (m+2)+c f \left (m^2+6 m+10\right )\right ) b+a^2 d^2 f^2 \left (m^2+7 m+12\right )\right ) x b+a^3 d^3 f^3 \left (m^3+9 m^2+26 m+24\right )\right )}{e+f x}dx}{(m+2) (b c-a d) (d e-c f)}+\frac {d (a+b x)^{m+1} (c+d x)^{-m-2} \left (a^2 d^2 f^2 \left (m^2+7 m+12\right )-2 a b d f \left (c f \left (m^2+6 m+10\right )+d e (m+2)\right )-\left (b^2 \left (-c^2 f^2 \left (m^2+5 m+6\right )-2 c d e f (m+4)+2 d^2 e^2\right )\right )\right )}{(m+2) (b c-a d) (d e-c f)}}{(m+3) (b c-a d) (d e-c f)}-\frac {d (a+b x)^{m+1} (c+d x)^{-m-3} (-a d f (m+4)+b c f (m+3)+b d e)}{(m+3) (b c-a d) (d e-c f)}}{(b e-a f) (d e-c f)}-\frac {f (a+b x)^{m+1} (c+d x)^{-m-3}}{(e+f x) (b e-a f) (d e-c f)}\) |
\(\Big \downarrow \) 172 |
\(\displaystyle -\frac {\frac {\frac {\frac {\int -\frac {(b c-a d)^3 f^3 (m+1) (m+2) (m+3) (a d f (m+4)-b (4 d e+c f m)) (a+b x)^m (c+d x)^{-m-1}}{e+f x}dx}{(m+1) (b c-a d) (d e-c f)}+\frac {d (a+b x)^{m+1} (c+d x)^{-m-1} \left (a^3 d^3 f^3 \left (m^3+9 m^2+26 m+24\right )-a^2 b d^2 f^2 (m+3) \left (c f \left (3 m^2+15 m+20\right )+d e (3 m+4)\right )-a b^2 d f \left (-c^2 f^2 \left (3 m^3+21 m^2+50 m+44\right )-2 c d e f \left (3 m^2+15 m+16\right )+2 d^2 e^2 (m+2)\right )-\left (b^3 \left (c^3 f^3 \left (m^3+6 m^2+11 m+6\right )+c^2 d e f^2 \left (3 m^2+17 m+26\right )-2 c d^2 e^2 f (m+5)+2 d^3 e^3\right )\right )\right )}{(m+1) (b c-a d) (d e-c f)}}{(m+2) (b c-a d) (d e-c f)}+\frac {d (a+b x)^{m+1} (c+d x)^{-m-2} \left (a^2 d^2 f^2 \left (m^2+7 m+12\right )-2 a b d f \left (c f \left (m^2+6 m+10\right )+d e (m+2)\right )-\left (b^2 \left (-c^2 f^2 \left (m^2+5 m+6\right )-2 c d e f (m+4)+2 d^2 e^2\right )\right )\right )}{(m+2) (b c-a d) (d e-c f)}}{(m+3) (b c-a d) (d e-c f)}-\frac {d (a+b x)^{m+1} (c+d x)^{-m-3} (-a d f (m+4)+b c f (m+3)+b d e)}{(m+3) (b c-a d) (d e-c f)}}{(b e-a f) (d e-c f)}-\frac {f (a+b x)^{m+1} (c+d x)^{-m-3}}{(e+f x) (b e-a f) (d e-c f)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\frac {\frac {\frac {d (a+b x)^{m+1} (c+d x)^{-m-1} \left (a^3 d^3 f^3 \left (m^3+9 m^2+26 m+24\right )-a^2 b d^2 f^2 (m+3) \left (c f \left (3 m^2+15 m+20\right )+d e (3 m+4)\right )-a b^2 d f \left (-c^2 f^2 \left (3 m^3+21 m^2+50 m+44\right )-2 c d e f \left (3 m^2+15 m+16\right )+2 d^2 e^2 (m+2)\right )-\left (b^3 \left (c^3 f^3 \left (m^3+6 m^2+11 m+6\right )+c^2 d e f^2 \left (3 m^2+17 m+26\right )-2 c d^2 e^2 f (m+5)+2 d^3 e^3\right )\right )\right )}{(m+1) (b c-a d) (d e-c f)}-\frac {\int \frac {(b c-a d)^3 f^3 (m+1) (m+2) (m+3) (a d f (m+4)-b (4 d e+c f m)) (a+b x)^m (c+d x)^{-m-1}}{e+f x}dx}{(m+1) (b c-a d) (d e-c f)}}{(m+2) (b c-a d) (d e-c f)}+\frac {d (a+b x)^{m+1} (c+d x)^{-m-2} \left (a^2 d^2 f^2 \left (m^2+7 m+12\right )-2 a b d f \left (c f \left (m^2+6 m+10\right )+d e (m+2)\right )-\left (b^2 \left (-c^2 f^2 \left (m^2+5 m+6\right )-2 c d e f (m+4)+2 d^2 e^2\right )\right )\right )}{(m+2) (b c-a d) (d e-c f)}}{(m+3) (b c-a d) (d e-c f)}-\frac {d (a+b x)^{m+1} (c+d x)^{-m-3} (-a d f (m+4)+b c f (m+3)+b d e)}{(m+3) (b c-a d) (d e-c f)}}{(b e-a f) (d e-c f)}-\frac {f (a+b x)^{m+1} (c+d x)^{-m-3}}{(e+f x) (b e-a f) (d e-c f)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\frac {\frac {\frac {d (a+b x)^{m+1} (c+d x)^{-m-1} \left (a^3 d^3 f^3 \left (m^3+9 m^2+26 m+24\right )-a^2 b d^2 f^2 (m+3) \left (c f \left (3 m^2+15 m+20\right )+d e (3 m+4)\right )-a b^2 d f \left (-c^2 f^2 \left (3 m^3+21 m^2+50 m+44\right )-2 c d e f \left (3 m^2+15 m+16\right )+2 d^2 e^2 (m+2)\right )-\left (b^3 \left (c^3 f^3 \left (m^3+6 m^2+11 m+6\right )+c^2 d e f^2 \left (3 m^2+17 m+26\right )-2 c d^2 e^2 f (m+5)+2 d^3 e^3\right )\right )\right )}{(m+1) (b c-a d) (d e-c f)}-\frac {f^3 (m+2) (m+3) (b c-a d)^2 (a d f (m+4)-b (c f m+4 d e)) \int \frac {(a+b x)^m (c+d x)^{-m-1}}{e+f x}dx}{d e-c f}}{(m+2) (b c-a d) (d e-c f)}+\frac {d (a+b x)^{m+1} (c+d x)^{-m-2} \left (a^2 d^2 f^2 \left (m^2+7 m+12\right )-2 a b d f \left (c f \left (m^2+6 m+10\right )+d e (m+2)\right )-\left (b^2 \left (-c^2 f^2 \left (m^2+5 m+6\right )-2 c d e f (m+4)+2 d^2 e^2\right )\right )\right )}{(m+2) (b c-a d) (d e-c f)}}{(m+3) (b c-a d) (d e-c f)}-\frac {d (a+b x)^{m+1} (c+d x)^{-m-3} (-a d f (m+4)+b c f (m+3)+b d e)}{(m+3) (b c-a d) (d e-c f)}}{(b e-a f) (d e-c f)}-\frac {f (a+b x)^{m+1} (c+d x)^{-m-3}}{(e+f x) (b e-a f) (d e-c f)}\) |
\(\Big \downarrow \) 141 |
\(\displaystyle -\frac {\frac {\frac {d (a+b x)^{m+1} (c+d x)^{-m-2} \left (a^2 d^2 f^2 \left (m^2+7 m+12\right )-2 a b d f \left (c f \left (m^2+6 m+10\right )+d e (m+2)\right )-\left (b^2 \left (-c^2 f^2 \left (m^2+5 m+6\right )-2 c d e f (m+4)+2 d^2 e^2\right )\right )\right )}{(m+2) (b c-a d) (d e-c f)}+\frac {\frac {d (a+b x)^{m+1} (c+d x)^{-m-1} \left (a^3 d^3 f^3 \left (m^3+9 m^2+26 m+24\right )-a^2 b d^2 f^2 (m+3) \left (c f \left (3 m^2+15 m+20\right )+d e (3 m+4)\right )-a b^2 d f \left (-c^2 f^2 \left (3 m^3+21 m^2+50 m+44\right )-2 c d e f \left (3 m^2+15 m+16\right )+2 d^2 e^2 (m+2)\right )-\left (b^3 \left (c^3 f^3 \left (m^3+6 m^2+11 m+6\right )+c^2 d e f^2 \left (3 m^2+17 m+26\right )-2 c d^2 e^2 f (m+5)+2 d^3 e^3\right )\right )\right )}{(m+1) (b c-a d) (d e-c f)}+\frac {f^3 (m+2) (m+3) (b c-a d)^2 (a+b x)^m (c+d x)^{-m} (a d f (m+4)-b (c f m+4 d e)) \operatorname {Hypergeometric2F1}\left (1,-m,1-m,\frac {(b e-a f) (c+d x)}{(d e-c f) (a+b x)}\right )}{m (d e-c f)^2}}{(m+2) (b c-a d) (d e-c f)}}{(m+3) (b c-a d) (d e-c f)}-\frac {d (a+b x)^{m+1} (c+d x)^{-m-3} (-a d f (m+4)+b c f (m+3)+b d e)}{(m+3) (b c-a d) (d e-c f)}}{(b e-a f) (d e-c f)}-\frac {f (a+b x)^{m+1} (c+d x)^{-m-3}}{(e+f x) (b e-a f) (d e-c f)}\) |
-((f*(a + b*x)^(1 + m)*(c + d*x)^(-3 - m))/((b*e - a*f)*(d*e - c*f)*(e + f *x))) - (-((d*(b*d*e + b*c*f*(3 + m) - a*d*f*(4 + m))*(a + b*x)^(1 + m)*(c + d*x)^(-3 - m))/((b*c - a*d)*(d*e - c*f)*(3 + m))) + ((d*(a^2*d^2*f^2*(1 2 + 7*m + m^2) - b^2*(2*d^2*e^2 - 2*c*d*e*f*(4 + m) - c^2*f^2*(6 + 5*m + m ^2)) - 2*a*b*d*f*(d*e*(2 + m) + c*f*(10 + 6*m + m^2)))*(a + b*x)^(1 + m)*( c + d*x)^(-2 - m))/((b*c - a*d)*(d*e - c*f)*(2 + m)) + ((d*(a^3*d^3*f^3*(2 4 + 26*m + 9*m^2 + m^3) - a^2*b*d^2*f^2*(3 + m)*(d*e*(4 + 3*m) + c*f*(20 + 15*m + 3*m^2)) - b^3*(2*d^3*e^3 - 2*c*d^2*e^2*f*(5 + m) + c^2*d*e*f^2*(26 + 17*m + 3*m^2) + c^3*f^3*(6 + 11*m + 6*m^2 + m^3)) - a*b^2*d*f*(2*d^2*e^ 2*(2 + m) - 2*c*d*e*f*(16 + 15*m + 3*m^2) - c^2*f^2*(44 + 50*m + 21*m^2 + 3*m^3)))*(a + b*x)^(1 + m)*(c + d*x)^(-1 - m))/((b*c - a*d)*(d*e - c*f)*(1 + m)) + ((b*c - a*d)^2*f^3*(2 + m)*(3 + m)*(a*d*f*(4 + m) - b*(4*d*e + c* f*m))*(a + b*x)^m*Hypergeometric2F1[1, -m, 1 - m, ((b*e - a*f)*(c + d*x))/ ((d*e - c*f)*(a + b*x))])/((d*e - c*f)^2*m*(c + d*x)^m))/((b*c - a*d)*(d*e - c*f)*(2 + m)))/((b*c - a*d)*(d*e - c*f)*(3 + m)))/((b*e - a*f)*(d*e - c *f))
3.32.2.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[b*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1 )/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + Simp[1/((m + 1)*(b*c - a*d)*(b*e - a*f)) Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*(m + 1) - b*(d*e*(m + n + 2) + c*f*(m + p + 2)) - b*d*f*(m + n + p + 3)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && ILtQ[m, -1] && (IntegerQ[n] || IntegersQ[2*n, 2*p] || ILtQ[m + n + p + 3, 0])
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/((m + 1)*(b*e - a*f)^( n + 1)*(e + f*x)^(m + 1)))*Hypergeometric2F1[m + 1, -n, m + 2, (-(d*e - c*f ))*((a + b*x)/((b*c - a*d)*(e + f*x)))], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && EqQ[m + n + p + 2, 0] && ILtQ[n, 0] && (SumSimplerQ[m, 1] || !Su mSimplerQ[p, 1]) && !ILtQ[m, 0]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_)*((g_.) + (h_.)*(x_)), x_] :> With[{mnp = Simplify[m + n + p]}, Simp[ (b*g - a*h)*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/((m + 1) *(b*c - a*d)*(b*e - a*f))), x] + Simp[1/((m + 1)*(b*c - a*d)*(b*e - a*f)) Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[(a*d*f*g - b*(d*e + c*f )*g + b*c*e*h)*(m + 1) - (b*g - a*h)*(d*e*(n + 1) + c*f*(p + 1)) - d*f*(b*g - a*h)*(mnp + 3)*x, x], x], x] /; ILtQ[mnp + 2, 0] && (SumSimplerQ[m, 1] | | ( !(NeQ[n, -1] && SumSimplerQ[n, 1]) && !(NeQ[p, -1] && SumSimplerQ[p, 1 ])))] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && NeQ[m, -1]
\[\int \frac {\left (b x +a \right )^{m} \left (d x +c \right )^{-4-m}}{\left (f x +e \right )^{2}}d x\]
\[ \int \frac {(a+b x)^m (c+d x)^{-4-m}}{(e+f x)^2} \, dx=\int { \frac {{\left (b x + a\right )}^{m} {\left (d x + c\right )}^{-m - 4}}{{\left (f x + e\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {(a+b x)^m (c+d x)^{-4-m}}{(e+f x)^2} \, dx=\text {Timed out} \]
\[ \int \frac {(a+b x)^m (c+d x)^{-4-m}}{(e+f x)^2} \, dx=\int { \frac {{\left (b x + a\right )}^{m} {\left (d x + c\right )}^{-m - 4}}{{\left (f x + e\right )}^{2}} \,d x } \]
\[ \int \frac {(a+b x)^m (c+d x)^{-4-m}}{(e+f x)^2} \, dx=\int { \frac {{\left (b x + a\right )}^{m} {\left (d x + c\right )}^{-m - 4}}{{\left (f x + e\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {(a+b x)^m (c+d x)^{-4-m}}{(e+f x)^2} \, dx=\int \frac {{\left (a+b\,x\right )}^m}{{\left (e+f\,x\right )}^2\,{\left (c+d\,x\right )}^{m+4}} \,d x \]